<style>
</style>
<template>
    <el-table
        ref="multipleTable"
        size="medium"
        :data="order.lis"
        height="550"
        border
        style="width: 100%">
        <el-table-column
            type="index"
            align="center"
            width="60"
        ></el-table-column>
        <el-table-column
            align="center"
            width="100"
            label="类型">
            <template slot-scope="scope">
                <span class="type-name" :style="{background:order.color}">{{scope.row.namewc}}</span>
            </template>
        </el-table-column>
        <el-table-column
            prop="place"
            align="center"
            label="科室"
            width="180">
        </el-table-column>
        <el-table-column
            prop="ctime"
            align="center"
            width="120"
            sortable
            label="收集时间">
        </el-table-column>
        <el-table-column
            align="center"
            sortable
            width="90"
            label="重量">
            <template slot-scope="scope">
                {{scope.row.weight}}kg
            </template>
        </el-table-column>
        <el-table-column
            prop="num"
            align="center"
            label="数量">
        </el-table-column>
        <el-table-column
            prop="uname"
            align="center"
            label="收运称重人">
        </el-table-column>
        <el-table-column
            prop="sn"
            align="center"
            width="145"
            label="条形码">
        </el-table-column>
        <el-table-column
            align="center"
            label="状态">
            <template slot-scope="scope">
                <div v-if="scope.row.sign1_time && scope.row.step == 0">
                    已确认
                </div>
                <div v-else>
                    {{step[scope.row.step]}}
                </div>
            </template>
            <!--statut-->
            <!-- 这个状态要判断：已称重、已确认、已出库 -->
        </el-table-column>
        <el-table-column
            align="center"
            label="科室交接">
            <el-table-column
                align="center"
                width="85"
                label="交接方式">
                <template slot-scope="scope">
                    <div v-if="scope.row.step != 0">
                        {{way[scope.row.step1_way]}}
                    </div>
                </template>
            </el-table-column>
            <el-table-column
                v-if="!hw_show_signtime"
                prop="step1_time"
                align="center"
                width="120"
                label="交接时间">
                <template slot-scope="scope">
                    <span v-if="currHosiptalId == 21 || currHosiptalId == 22">{{scope.row.step == '0' ? '' : '已确认'}}</span>
                    <span v-else>{{scope.row.step1_time}}</span>
                </template>
            </el-table-column>
            <el-table-column
                prop="step1_uname"
                align="center"
                width="120"
                label="交接确认">
                <template slot-scope="scope"> <!-- 南院、北院账户则改为显示工号或姓名 -->
                    <span>{{scope.row.step1_uinfo ? scope.row.step1_uinfo : scope.row.step1_uname}}</span>
                    
                    <div v-if="scope.row.step1_sign != ''">
                        <img :src="scope.row.step1_sign" alt="" @click="showSign(scope.$index, scope.row,scope.row.step1_sign)" style="width: 25px;vertical-align: middle;">
                    </div>
                </template>
            </el-table-column>
        </el-table-column>
    </el-table>
</template>

<script>
import store from '../../../store'
	export default {
        name:'WasteOrderLis',
        components: {},
        props:{
            order:{
                type:Object,
                default:function(){
                    return {
                        lis:{}
                    }
                }
            }
        },
		data(){
			return {
				step: {
                    '0': '已称重',
                    '1':'已确认',
                    '2':'已出库'
                },
                way:{
                    '0': 'APP确认',
                    '1':'微信确认',
                    '2':'网页端确认',
                    '4':'微信确认'
                },
                currHosiptalId: Cookies.get('categoryid'),
			}
		},
        computed:{
            hw_show_signtime(){
                return store.state.hwConfig.hw_show_signtime
            }
        },
        created(){
        },
		methods:{
            showSign(index,row,image){
                this.$emit('showSign', index, row, image)
            }
        }
	}
</script>
